import com.app.exception.BusinessException
import com.app.sv.ywms.kc.YonhandnumService
import com.app.ywms.kc.Ycrkmx
import com.app.ywms.rk.xhqrd.Yxhqrd

def data=binding.getVariable('data')
YonhandnumService yonhandnumService=binding.getBean('yonhandnumService')
data.each {
    def qrd=(Yxhqrd)it
    def mx =new Ycrkmx()
    mx.bdCorp=qrd.bdCorp
    mx.crklx=0
    mx.invmandoc=qrd.bdInvmandoc
    mx.gh=qrd.gh
    mx.ht=qrd.contract
    mx.hz=qrd.bdCumandoc
    mx.insl=qrd.sjsl
    mx.note=qrd.note
    mx.pc=qrd.htpch
    mx.sourceBid=qrd.id
    mx.sourceHid=qrd.id
    mx.sourceBillCode=qrd.billno
    mx.sourceBillType=qrd.billtype
    mx.billdate=qrd.billdate

   yonhandnumService.saveYcrkmx(mx);
}